<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

    </style>
</head>

<body>
    <!-- vue=>虚拟dom -->
    <div id="app">
        {{ count }}

        <button @click="count += 1">+++</button>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
    <script>
        const app = new Vue({
            el: "#app",
            data: {
                count: 100
            },
            // 渲染页面之前 ==> 获取不到html结构的
            beforeMount() {
                // console.log(document.getElementById('span'))
            },
            // 挂载完毕（操作dom结构）
            mounted() {

            },
            // 数据修改之前 (数据发生改变，视图还没有发生改变)
            beforeUpdate() {
                
                
            },
            updated() {
                console.log(this.count)
            }
        })


    </script>
</body>

</html>